package cn.itcast.day04.demo03;

public class Demo03MethodPrint {
    public static void main(String[] args) {
        printCount(5);
// 求0-100偶数和
        int j = 1;
        int sum = 0;
        while(j <= 100){
            if(j%2 == 0){
                sum+=j;

            }
            j++;
        }
        System.out.println(sum);


        int i = 1;
        int sumdo = 0;
        do {
            if (i%2==0) {
                sumdo = sumdo + i;
            }
            i++;
        }
        while (i <=100);
        System.out.println(sumdo);
}
    public static void printCount(int num){
        for (int i = 0; i < num; i++) {
            System.out.println("hello world" +  (i + 1));

        }
    }
}
